<template>
	<view style="margin-top: 110px;text-align:center;" >
		<image src="@/static/image/order/pay-success.png" style="width: 70px;height: 70px;"></image>
		<view class="font-b font-l color-black" style="padding-top: 25px;">支付成功</view>
		<u-button :customStyle="{'width':'145px', 'height':'40px','font-size': '16px', 'margin-top':'50px'}"
			type="primary" shape="circle" text="查看订单" @click="goDetail"></u-button>
		<u-button :customStyle="{'width':'145px', 'height':'40px','fontSize': '16px', 'margin-top':'20px'}"
			plain="true" type="primary" shape="circle" text="返回首页" @click="goIndex"></u-button>
	</view>
</template>

<script setup>
	import { onLoad } from "@dcloudio/uni-app";
	import { reactive } from "vue";
	import pageRoute from '@/utils/pageRoute'
	const data = reactive({
		id: ''
	})
	onLoad((options) => {
		data.id = options.id || '';
	})
	
	const goDetail = () => {
		pageRoute.routeRedirect('pages/order/detail', {id: data.id})
	}
	
	const goIndex = () => {
		pageRoute.reLaunchIndex()
	}
</script>